package com.ellricky.baselib.ui.order

import android.app.Activity
import com.andr.common.ui.adapter.BaseRecyclerAdapter
import com.andr.common.ui.adapter.SmartViewHolder
import com.ellricky.baselib.R
import com.ellricky.baselib.entity.RenewalInfo
import com.ellricky.baselib.widget.DetailItemView

class RenewalAdapter(private val context: Activity) :
    BaseRecyclerAdapter<RenewalInfo>(R.layout.base_adapter_renewal_manage) {

    override fun onBindViewHolder(holder: SmartViewHolder, data: RenewalInfo, p2: Int) {
        holder.itemView.findViewById<DetailItemView>(R.id.tv_member_name).apply {
            value = data.member_name
        }

        holder.itemView.findViewById<DetailItemView>(R.id.tv_teacher_name).apply {
            value = data.teacher_name
        }

        holder.itemView.findViewById<DetailItemView>(R.id.tv_class_number).apply {
            value = data.num_course_quantity
        }

        holder.itemView.findViewById<DetailItemView>(R.id.tv_class_manager).apply {
            value = data.g_name
        }
    }
}